<div id="authItemChild">

	<h3><?php echo Yii::t('authItem', 'Children'); ?></h3>

	<div class="form">
		<?php echo $childForm->render(); ?>
	</div>

	<?php if( count($children)>0 ): ?>

		<table class="authTable childTable" style="width:320px;" border="0" cellpadding="0" cellspacing="0">

			<tr>

				<th class="nameColumn"><?php echo Yii::t('auth', 'Name'); ?></th>
				<th class="typeColumn"><?php echo Yii::t('auth', 'Type'); ?></th>
				<th class="removeColumn" style="width:60px;">&nbsp;</th>

			</tr>

			<?php foreach( $children as $child ): ?>

				<tr>

					<td><?php echo $child->name; ?></td>
					<td><?php echo $auth->getAuthItemTypeString($child->type); ?></td>

					<td>
						<?php
						echo CHtml::linkButton(Yii::t('auth', 'Remove'), array(
							'submit'=>array('authItem/removeChild', 'name'=>$model->name, 'child'=>$child->name),
							'confirm'=>Yii::t('auth', 'Are you sure to remove this child?')));
						?>
					</td>

				</tr>

			<?php endforeach; ?>

		</table>

	<?php endif; ?>

</div>
